﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="addSB.aspx.cs" Inherits="admin_addSB" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
    .style1
    {
        width: 100%;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div class="Body_Title">
    系统信息管理 》》添加修改设备信息</div>
<table class="style1">
    <tr>
        <td width="240px">
            设备全称</td>
        <td width="360px">
            <asp:TextBox ID="tbxSBM" runat="server"></asp:TextBox>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            设备分类</td>
        <td>
            <asp:DropDownList ID="ddlSBLX" runat="server" AutoPostBack="True" 
                DataSourceID="SqlDataSourceSBLX" DataTextField="c_Name" DataValueField="cID">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSourceSBLX" runat="server" 
                ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                SelectCommand="SELECT * FROM [classInfo] WHERE ([c_parentID] = @c_parentID)">
                <SelectParameters>
                    <asp:Parameter DefaultValue="3" Name="c_parentID" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            设备作用</td>
        <td>
            <asp:TextBox ID="tbxSBZY" runat="server"></asp:TextBox>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            设备所属教室</td>
        <td>
            <asp:DropDownList ID="ddlJS" runat="server" AutoPostBack="True" 
                DataSourceID="SqlDataSourceJS" DataTextField="j_jsh" DataValueField="jfID">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSourceJS" runat="server" 
                ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                SelectCommand="SELECT [jfID], [j_Name], [j_jsh] FROM [jfInfo]">
            </asp:SqlDataSource>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            备注</td>
        <td>
            <asp:TextBox ID="tbxSBBZ" runat="server" Height="60px" TextMode="MultiLine" 
                Width="275px"></asp:TextBox>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            增加数量</td>
        <td>
            <asp:TextBox ID="tbxNum" runat="server"></asp:TextBox>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="确定" />
        </td>
        <td>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                InsertCommand="INSERT INTO sbInfo(s_jfID, s_class, s_Name, s_zy, s_remark) VALUES (@Param1, @Param2, @Param3, @Param4, @Param5)" 
                oninserting="SqlDataSource1_Inserting" 
                SelectCommand="SELECT * FROM sbInfo WHERE (sbID = @sbID)" 
                onselecting="SqlDataSource1_Selecting" 
                
                UpdateCommand="UPDATE sbInfo SET s_jfID = @Param1, s_class = @Param2, s_Name = @Param3, s_zy = @Param4, s_remark = @Param5 WHERE (sbID = @Param6)" 
                onupdating="SqlDataSource1_Updating">
                <InsertParameters>
                    <asp:Parameter Name="Param1" />
                    <asp:Parameter Name="Param2" />
                    <asp:Parameter Name="Param3" />
                    <asp:Parameter Name="Param4" />
                    <asp:Parameter Name="Param5" />
                </InsertParameters>
                <SelectParameters>
                    <asp:Parameter Name="sbID" Type="String" />
                </SelectParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Param1" />
                    <asp:Parameter Name="Param2" />
                    <asp:Parameter Name="Param3" />
                    <asp:Parameter Name="Param4" />
                    <asp:Parameter Name="Param5" />
                    <asp:Parameter Name="Param6" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</asp:Content>

